home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / appsrcs.zip / APPBAR.ZIP / APPGRP.H < prev    next >
Text File  |  1993-01-25  |  3KB  |  60 lines

  1. //----------------------------------------------------------------------
  2. // File name: showgrp.h                            Creation date: 920701 
  3. //
  4. // Abstract:  Header file for program to show how to read group files
  5. //
  6. // Development Team: bts
  7. //
  8. // Written by Microsoft Product Support Services, Windows Developer Support.
  9. //
  10. // Copyright (c) 1992 Microsoft Corporation. All rights reserved.
  11. //----------------------------------------------------------------------
  12.  
  13. // Group file header - Note: this is slightly different than what
  14. // was given in previous documentation of the structure.  The IconFormat
  15. // member was previously documented as being two words: wBitsPerPixel
  16. // and wPlanes.  In actuality, this information is stored in one 
  17. // word with the the high byte containing the number of planes and the
  18. // low byte containing the number of bits per pixel.  It should also
  19. // be noted that the number of planes is 0 based.
  20.  
  21. typedef struct tagGROUPHEADER {
  22.   char    cIdentifier [4];            // PMCC
  23.   WORD    wCheckSum;                  // Negative sum of all words
  24.   WORD    cbGroup;                    // Number of bytes in group file
  25.   WORD    nCmdShow;                   // How to show the group
  26.   RECT    rcNormal;                   // Coordinates of the window
  27.   POINT   ptMin;                      // Lower left corner
  28.   WORD    pName;                      // Offset to group file name
  29.   WORD    wLogPixelsX;                // icons horz resolution
  30.   WORD    wLogPixelsY;                // icons vert resolution
  31.   WORD    wIconFormat;                // Plane and bits per pixel
  32.   WORD    wReserved;                  // Unused at this time
  33.   WORD    cItems;                     // Count of items in group
  34. } PMGROUPHEADER;
  35.  
  36. // Item structure for the items in the group file.  Probably the most
  37. // important aspect of the item structure is that the icons are stored
  38. // in a device dependent manner with-in the group file.  A consequence
  39. // of this is that when you change display drivers, Windows has to
  40. // rebuild the group files.  To create the new bit masks.
  41.  
  42. typedef struct tagITEMDATA {
  43.   POINT   pt;                         // Lower left location of item icon
  44.   WORD    iIcon;                      // Index value for icon
  45.   WORD    cbHeader;                   // Bytes in icon resource
  46.   WORD    cbANDPlane;                 // Bytes in icon AND plane
  47.   WORD    cbXORPlane;                 // Bytes in icon XOR plane
  48.   WORD    pHeader;                    // Offset to resource header
  49.   WORD    pANDPlane;                  // Offset to AND plane
  50.   WORD    pXORPlane;                  // Offset to XOR plane
  51.   WORD    pName;                      // Offset to item name
  52.   WORD    pCommand;                   // Offset to .exe name
  53.   WORD    pIconPath;                  // Offset to .exe name containing icon
  54. } PMITEMDATA;
  55.  
  56. char FAR * lpGroupFileData;
  57.  
  58. // Function prototypes
  59. BOOL ReadGroupFile (LPSTR lpszGroupFileName, PHANDLE ghMemGroupFileData);
  60.